package com.example.demo.service.impl;

import com.alibaba.fastjson.JSON;
import com.example.demo.mapper.BackRoleMapper;
import com.example.demo.pojo.BackRole;
import com.example.demo.pojo.HaveId;
import com.example.demo.service.BackRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class BackRoleImpl implements BackRoleService {
    @Resource
    BackRoleMapper backRoleMapper;
    @Override
    public String  BackRoleSelect(int roleid, String rolename) {
        List<BackRole> backRoles=backRoleMapper.BackRoleSelect(roleid,rolename);
        return JSON.toJSONString(backRoles);
    }

    @Override
    public String haveroleid(int haveid) {
         List<HaveId> a= backRoleMapper.haveroleid(haveid);
        return JSON.toJSONString(a);
    }
}
